package org.bp.util;

public class ThreadUtils {
    private static ThreadLocal<Long> perfLog = new ThreadLocal<Long>();

    public ThreadUtils() {
    }

    public static boolean sleep(long ms) {
        try {
            Thread.sleep(ms);
            return true;
        } catch (InterruptedException var3) {
            return false;
        }
    }

    public static void resetPerf() {
        perfLog.set(Long.valueOf(System.currentTimeMillis()));
    }

    public static long getPerf() {
        long now = System.currentTimeMillis();
        long perf = now - ((Long)perfLog.get()).longValue();
        perfLog.set(Long.valueOf(now));
        return perf;
    }
}
